package com.lucun.es_transaction.service;

import com.lucun.es_transaction.entity.Commodity;
import com.lucun.es_transaction.util.JsonResult;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface CommodityService {
    JsonResult<?> insert(Commodity commodity, HttpServletRequest request);//商品添加
    JsonResult<?> updateByPrimaryKey(Commodity commodity,HttpServletRequest request);//商品下架
    JsonResult<?> updateByPrimaryKeySelective(Commodity commodity, HttpServletRequest request);//商品信息修改
    JsonResult<?> selectByPrimaryKey(Commodity commodity, HttpServletRequest request);//商品信息查询
    JsonResult<?> selectBynumber(Commodity commodity, HttpServletRequest request);//商品信息查询number
    JsonResult<?> selectnumber(int comNumber, HttpServletRequest request);//商品信息查询number2

    JsonResult<?> selectByname(Commodity commodity, HttpServletRequest request);//商品名称关键字查询
    JsonResult<?> selectBynameeva(Commodity commodity, HttpServletRequest request);//商品名称关键字查询评论量降序排列

    JsonResult<?> selectBynameASC(Commodity commodity, HttpServletRequest request);//商品名称关键字查询价格升序排列
    JsonResult<?> selectBynameDESC(Commodity commodity, HttpServletRequest request);//商品名称关键字查询价格升序排列
    JsonResult<?> selectBycategory(Commodity commodity, HttpServletRequest request);//商品类别查询
    //获取所有的商品信息
    List<Commodity> getProductList(String sqlId);
    JsonResult<?> getuserId(Commodity commodity, HttpServletRequest request);//查询个人商品发布信息


}
